import 'package:dk_flutter_base/dk_core.dart';
import 'package:flutter/material.dart';

class RefreshRightItemTitleBloc extends EventBloc<String> {
  final int unreadCount;
  RefreshRightItemTitleBloc({this.unreadCount});
  @override
  // TODO: implement initialState
  get initialState => "${this.unreadCount}";
}

class RightItemTitle extends StatefulWidget {
  final String title;
  final RefreshRightItemTitleBloc bloc;
  RightItemTitle({this.title,this.bloc});
  @override
  _RightItemTitleState createState() => _RightItemTitleState(this.bloc,title: this.title);
}

class _RightItemTitleState extends State<RightItemTitle> {
  String title = "";
  RefreshRightItemTitleBloc bloc;
  _RightItemTitleState(RefreshRightItemTitleBloc bloc,{this.title});
  @override
  Widget build(BuildContext context) {
    return BlocBuilder(
      bloc: this.bloc,
      builder: (BuildContext context,String event) {
        return Text(event,
        style: TextStyle(
            color: Colors.white,
            fontSize: 11
        ),
        );
      },
    );
  }
}
